const initState = {
  token: null,
  a:1
};

export default function auth(state = initState, action=null) {
  switch (action.type) {
    case 'auth/login':
      return {
        ...state,
        token:action.payload
      }
  }
  return state;
}
export  function testRedux(state = initState, action=null) {
    switch (action.type) {
        case 'single/submit':
            console.log('action.form',action.form);
            let a = action.form;
            if (state.test) {
                a += state.test;
            }
            return  Object.assign({},state,{test: a})
    }
    return state;
}
